import {Component, OnInit} from '@angular/core';
import {TimerService} from "../timer.service";

@Component({
  selector: 'app-myc01-user',
  templateUrl: './myc01-user.component.html',
  styleUrls: ['./myc01-user.component.css']
})
export class Myc01UserComponent implements OnInit {

  constructor(private timer: TimerService) {
  }

  ngOnInit(): void {
  }

  doLogin() {
    // let start = new Date().getTime()

    this.timer.start()
    console.log("开始提交登录信息")
    console.log("登录成功")
    // let end = new Date().getTime()
    // console.log("登录耗时：", end - start)
    this.timer.end("登录")
  }

  doRegister() {
    this.timer.start()
    console.log("开始提交注册信息")
    console.log("登录成功")
    this.timer.end("注册")
  }
}
